Skip to content

doozer: point reconciliation-PR upstream heuristic at quay-proxy.ci.registry.openshift.org - #3198

Draft
ashwindasr wants to merge 2 commits into
openshift-eng:mainfrom
ashwindasr:cursor-26419-d5pe
Draft

doozer: point reconciliation-PR upstream heuristic at quay-proxy.ci.registry.openshift.org#3198
ashwindasr wants to merge 2 commits into
openshift-eng:mainfrom
ashwindasr:cursor-26419-d5pe

Conversation

@ashwindasr

@ashwindasr ashwindasr commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

resolve_upstream_from() in doozer/doozerlib/cli/images_streams.py computes the desired upstream FROM pullspec used by doozer images:streams prs open when opening/updating reconciliation PRs against component repos. When an image member entry has no explicit content.source.ci_alignment.upstream_image override, it fell back to a hardcoded heuristic pointing at registry.ci.openshift.org. This switches that heuristic to quay-proxy.ci.registry.openshift.org, keeping the same /ocp/{major}.{minor}:{image_name} path structure.

Scope is intentionally narrow:

  • Only the heuristic fallback branch of resolve_upstream_from() is changed. The image_entry.stream and explicit ci_alignment.upstream_image branches are driven by ocp-build-data config and are unaffected.
  • The downstream ci_build_root coordinate parsing is host-agnostic (rsplit on / and :) and needs no change.
  • Other unrelated registry.ci.openshift.org references elsewhere in the codebase (imagestream mirroring in this same file, build_sync.py, promote.py, get_nightlies.py, sync_ci_images.py, rhcos.py, distgit.py, rebaser.py, and the shared REGISTRY_CI_OPENSHIFT constant) are out of scope and untouched.

Note: This is expected to be a temporary change. We may need to switch this heuristic back to registry.ci.openshift.org (or another host) once the underlying registry migration this is working around is complete.

Test plan

  • Updated test_resolve_upstream_from_with_member_using_heuristic and test_resolve_upstream_from_with_member_using_payload_name in doozer/tests/cli/test_images_streams.py to assert against the new host.
  • uv run pytest --verbose --color=yes doozer/tests/cli/test_images_streams.py -- 28/28 passed.

Summary by CodeRabbit

  • Bug Fixes
    • Updated upstream CI image references to use the quay-proxy.ci.registry.openshift.org registry.
    • Improved compatibility when resolving upstream images from release payloads.

…egistry.openshift.org

resolve_upstream_from() fell back to the raw registry.ci.openshift.org
host when computing the desired upstream FROM pullspec used by
`images:streams prs open`. Point it at the quay-proxy mirror instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jupierce for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift-eng/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0dacba85-1103-4779-812e-8adf7a5d56a6

📥 Commits

Reviewing files that changed from the base of the PR and between edb97ca and 62b7a54.

📒 Files selected for processing (1)
  • doozer/doozerlib/cli/images_streams.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • doozer/doozerlib/cli/images_streams.py

Walkthrough

The upstream image resolver now returns member pullspecs through quay-proxy.ci.registry.openshift.org, and two unit tests expect the updated registry prefix.

Changes

Upstream pullspec update

Layer / File(s) Summary
Resolver output and test expectations
doozer/doozerlib/cli/images_streams.py, doozer/tests/cli/test_images_streams.py
resolve_upstream_from uses the quay-proxy registry prefix, with heuristic and payload-name tests updated accordingly.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning Commit uses Co-authored-by: Cursor <cursoragent@cursor.com> and lacks Assisted-by/Generated-by, which the check forbids for AI tools. Replace the AI-related Co-authored-by trailer with the appropriate Red Hat Assisted-by or Generated-by trailer in the commit or PR metadata.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: updating the reconciliation-PR upstream heuristic to use quay-proxy.ci.registry.openshift.org.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Weak-Crypto ✅ Passed The PR only changes a registry hostname in resolve_upstream_from(); no crypto primitives, custom crypto, or secret comparisons were added.
Container-Privileges ✅ Passed Only a Python source file changed; no container/K8s manifests or privilege-related settings (privileged, hostPID, allowPrivilegeEscalation, etc.) were introduced.
No-Sensitive-Data-In-Logs ✅ Passed PR only changes a returned pullspec in resolve_upstream_from and updates tests; no new logging/print statements or sensitive data exposure was added.
No-Hardcoded-Secrets ✅ Passed Touched files only add registry host literals; no api_key/secret/token/password assignments, embedded creds, or long base64 strings were found.
No-Injection-Vectors ✅ Passed Only a registry hostname string changed in a return value; no SQL, shell, eval/exec, pickle, yaml.load, or DOM sinks were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

…orkaround

Co-authored-by: Cursor <cursoragent@cursor.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@ashwindasr
ashwindasr marked this pull request as draft July 23, 2026 17:14
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 23, 2026
@deepsm007

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants